package com.tekj.cxqcb.view.Module.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.squareup.picasso.Picasso;
import com.tekj.cxqcb.R;
import com.tekj.cxqcb.operation.resultBean.SelectInviteListBean;

import java.util.List;

import common.widget.CircleTransform;

/**
 * 邀请记录adapter
 */
public class InvitationRecordAdapter extends BaseQuickAdapter<SelectInviteListBean.DataBean.ListBean, BaseViewHolder> {

    public InvitationRecordAdapter(@Nullable List<SelectInviteListBean.DataBean.ListBean> data) {
        super(R.layout.item_record, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SelectInviteListBean.DataBean.ListBean item) {
        if (item.getHead() != null && !item.getHead().equals(""))
            Picasso.get().load(item.getHead()).transform(new CircleTransform()).into((ImageView) helper.getView(R.id.img_sdv_head));
        helper.setText(R.id.tv_title,item.getName());

        helper.setText(R.id.tv_time,item.getTime());
    }
}
